package com.test.studytest

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        btn.setOnClickListener {
            if(motion_layout.targetPosition == 1.0f){
                motion_layout.transitionToStart()
            }else{
                motion_layout.transitionToEnd()
            }
        }
    }
}